import k, q, r, b, n, p, AI, copy

def WinningEvaluation(boardlist):
    king = copy.deepcopy(k.k)
    queen = copy.deepcopy(q.q)
    rook = copy.deepcopy(r.r)
    pb = copy.deepcopy(b.b)
    knight = copy.deepcopy(n.n)
    pp = copy.deepcopy(p.p)
    
    winscr = 0

    while "k" in boardlist:
        winscr += 90000
        i = boardlist.index("k")
        winscr += king[i]
        boardlist[i] = "u"
        
    while "K" in boardlist:
        winscr += 90000
        i = boardlist.index("K")
        winscr += king[i]
        boardlist[i] = "u"
        
    while "q" in boardlist:
        winscr += 100
        i = boardlist.index("q")
        winscr += queen[i]
        boardlist[i] = "u"
        
    while "Q" in boardlist:
        winscr += 100
        i = boardlist.index("Q")
        winscr += queen[i]
        boardlist[i] = "u"
        
    while "r" in boardlist:
        winscr += 55
        i = boardlist.index("r")
        winscr += rook[i]
        boardlist[i] = "u"
        
    while "R" in boardlist:
        winscr += 55
        i = boardlist.index("R")
        winscr += rook[i]
        boardlist[i] = "u"
        
    while "b" in boardlist:
        winscr += 35
        i = boardlist.index("b")
        winscr += pb[i]
        boardlist[i] = "u"
        
    while "B" in boardlist:
        winscr += 35
        i = boardlist.index("B")
        winscr += pb[i]
        boardlist[i] = "u"
        
    while "n" in boardlist:
        winscr += 35
        i = boardlist.index("n")
        winscr += knight[i]
        boardlist[i] = "u"
        
    while "N" in boardlist:
        winscr += 35
        i = boardlist.index("N")
        winscr += knight[i]
        boardlist[i] = "u"
        
    while "p" in boardlist:
        winscr += 10
        i = boardlist.index("p")
        winscr += pp[i]
        boardlist[i] = "u"
        
    while "P" in boardlist:
        winscr += 10
        i = boardlist.index("P")
        winscr += pp[i]
        boardlist[i] = "u"
        
    return winscr
